<?php

require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    $this->enablePlugins('sfDoctrinePlugin');
    $this->enablePlugins('sfDoctrineGuardPlugin');
    $this->enablePlugins('sfFormExtraPlugin');
    $this->enablePlugins('sfPHPUnit2Plugin');
    $this->enablePlugins('sfDatagridPlugin');
    $this->enablePlugins('sfDatagrid2Plugin');
    $this->enablePlugins('sfJQueryUIPlugin');
    
    if($this->getEnvironment() == 'prod') {
      $this->setWebDir($this->getRootDir().'');
    }
  }
  
  public function getEnvironment() {
    if(!isset($_SERVER ['HTTP_HOST']) OR $_SERVER ['HTTP_HOST'] == 'localhost') {
      return 'dev';
    } else {
      return 'prod';
    }
  }
}
